*/
#include "config.h"
+
#include <math.h>
#include <string.h>
static long rgba_to_hsva (char *src,
char *dst,
- long n);
+ long samples);
static long hsva_to_rgba (char *src,
char *dst,
- long n);
+ long samples);
int init (void);
static long
rgba_to_hsva (char *src,
char *dst,
- long n)
+ long samples)
{
+ long n = samples;
+
while (n--)
{
double red = ((double *) src)[0];
src += 4 * sizeof (double);
dst += 4 * sizeof (double);
}
- return n;
+
+ return samples;
}
static long
hsva_to_rgba (char *src,
char *dst,
- long n)
+ long samples)
{
+ long n = samples;
+
while (n--)
{
double hue = ((double *) src)[0];
src += 4 * sizeof (double);
dst += 4 * sizeof (double);
}
- return n;
+
+ return samples;
}